import { reactive } from "./reactivity/reactive";
import { effect } from "./reactivity/effect";
import { computed } from "./reactivity/computed";
import { ref } from "./reactivity/ref";
import { watch } from "./reactivity/watch";
import { createApp } from "./renderer/renderer";
import { Vnode } from "./renderer/vnode";
const app = document.querySelector("#app");

const obj = reactive({
  name: "杨大仙",
  age: 18,
});

const b = ref({
  name: "ttx",
});

effect(() => {
  const vnode: Vnode = {
    tag: "div",
    children: [
      {
        tag: "p",
        key:1,
        children: "你好",
      },
      {
        tag: "p",
        key:2,
        children: "你好2",
      },
    ],
  };

  const vnode2: Vnode = {
    tag: "div",
    children: [
      {
        tag: "p",
        key:1,
        children: "你好",
      },
      {
        tag: "p",
        key:2,
        children: "你好2",
      },
      {
        tag: "p",
        key:3,
        children: "你好3",
      },
    ],
  };

  createApp(vnode).mount(app);
  createApp(vnode2).mount(app);
});
